<script setup>
import { inject, ref } from "vue";

const signature = ref("");

function signatureEvent(base64) {
  signature.value = base64;
}
const downloadContract = () => {};

// 创建响应式数据
const showPopup = ref(false);

const sendEmail = () => {};
</script>

<template>
  <view class="protocolView">
    <view class="agreement-content">
      <view class="agreement-title">购买店主经销商套餐合同</view>
      <view class="agreement-text"
        >购买店主经销商套士大夫撒地方送达是的发送到防守打法水电费士大夫稍等,是的发送啥地方阿斯蒂芬
        餐合同</view
      >
      <!-- <image :src="signature" mode="scaleToFill" /> -->

      <view class="signature-k">
        <xz-signature @save="signatureEvent" />
      </view>
    </view>
  </view>

  <view class="foodr-bt">
    <view class="bt-next" @click="downloadContract">下载合同</view>
    <view class="bt-sbuit" @click="showPopup = true">发送到邮箱</view>
  </view>

  <!-- 赠送商品弹框 -->
  <u-popup
    :show="showPopup"
    mode="center"
    round="10"
    @close="close"
    @open="open"
  >
    <view class="productGift">
      <view class="popup-content-title">发送合同到邮箱</view>
      <u--input placeholder="@com邮箱" border="surround"></u--input>
      <view class="popup-content-box">
        <view class="popup-content-bt">
          <u-button
            class="popup-content-qx"
            text="取消"
            @click="showPopup = false"
          ></u-button>
          <u-button
            class="popup-content-cl"
            text="发送"
            @click="sendEmail"
          ></u-button>
        </view>
      </view>
    </view>
  </u-popup>
</template>

<style lang="scss" scoped>
@import "./protocolView.scss";
</style>
